__author__ = 'Dianlei Zhang'

class person(object):

    @property
    def age(self):
        return self._age

    @age.setter
    def age(self, value):
        if value > 10:
            self._age = value
        else:
            print("非法age")

r = person()
r.age = 11
print(r.age)

r.age = 9
print(r.age)

